home *** CD-ROM | disk | FTP | other *** search
/ PD ROM 1 / PD ROM Volume I - Macintosh Software from BMUG (1988).iso / Stacks / Hyper Utilities / Scripting Aids & Tips / WhooshButton / card_2897.txt < prev    next >
Encoding:
Text File  |  1988-04-24  |  4.6 KB  |  186 lines

  1. -- card: 2897 from stack: in
  2. -- bmap block id: 4639
  3. -- flags: 0000
  4. -- background id: 2607
  5. -- name: Homer
  6. ----- HyperTalk script -----
  7. on idle
  8.   -- hide button "DONE!"
  9. end idle
  10.  
  11.  
  12.  
  13. -- part 1 (button)
  14. -- low flags: 00
  15. -- high flags: A002
  16. -- rect: left=23 top=165 right=188 bottom=131
  17. -- title width / last selected line: 0
  18. -- icon id / first selected line: 0 / 0
  19. -- text alignment: 1
  20. -- font id: 0
  21. -- text size: 12
  22. -- style flags: 0
  23. -- line height: 16
  24. -- part name: WHOOSH
  25. ----- HyperTalk script -----
  26. on mouseUp
  27.   set lockscreen to true
  28.   set the cursor to 4
  29.   choose button tool
  30.   get the location of button "WhooshButton"
  31.   click at it
  32.   doMenu "Copy Button"
  33.   choose browse tool
  34.   go to home
  35.   doMenu "Paste Button"
  36.   choose browse tool
  37.   go to card "Homer" in stack "WhooshButton" -- your changes go here
  38.   set lockscreen to false
  39.   hide button "cover"
  40.   set hilite of button "DONE!" to true
  41.   wait 20 ticks
  42.   set hilite of button "DONE!" to false
  43.   wait 20 ticks
  44.   set hilite of button "DONE!" to true
  45.   wait 20 ticks
  46.   set hilite of button "DONE!" to false
  47.   wait 20 ticks
  48.   set hilite of button "DONE!" to true
  49.   wait 20 ticks
  50.   show button "cover"
  51. end mouseUp
  52.  
  53.  
  54.  
  55. -- part 6 (button)
  56. -- low flags: 00
  57. -- high flags: A003
  58. -- rect: left=138 top=169 right=198 bottom=251
  59. -- title width / last selected line: 0
  60. -- icon id / first selected line: 0 / 0
  61. -- text alignment: 1
  62. -- font id: 0
  63. -- text size: 12
  64. -- style flags: 0
  65. -- line height: 16
  66. -- part name: WhooshButton
  67. ----- HyperTalk script -----
  68. on mouseUp
  69.   visual dissolve
  70.   go to stack "WhooshButton" -- your stack name goes here
  71. end mouseUp
  72.  
  73.  
  74.  
  75. -- part 2 (field)
  76. -- low flags: 01
  77. -- high flags: 0007
  78. -- rect: left=135 top=165 right=312 bottom=478
  79. -- title width / last selected line: 0
  80. -- icon id / first selected line: 0 / 0
  81. -- text alignment: 0
  82. -- font id: 3
  83. -- text size: 14
  84. -- style flags: 0
  85. -- line height: 18
  86. -- part name: 
  87.  
  88.  
  89. -- part 3 (button)
  90. -- low flags: 00
  91. -- high flags: 2000
  92. -- rect: left=23 top=273 right=312 bottom=131
  93. -- title width / last selected line: 0
  94. -- icon id / first selected line: 0 / 0
  95. -- text alignment: 1
  96. -- font id: 0
  97. -- text size: 12
  98. -- style flags: 0
  99. -- line height: 16
  100. -- part name: 
  101. ----- HyperTalk script -----
  102. on mouseUp
  103.   visual effect dissolve
  104.   go to next card
  105. end mouseUp
  106.  
  107.  
  108.  
  109. -- part 4 (button)
  110. -- low flags: 00
  111. -- high flags: A002
  112. -- rect: left=23 top=246 right=269 bottom=131
  113. -- title width / last selected line: 0
  114. -- icon id / first selected line: 0 / 0
  115. -- text alignment: 1
  116. -- font id: 0
  117. -- text size: 12
  118. -- style flags: 0
  119. -- line height: 16
  120. -- part name: See the Script
  121. ----- HyperTalk script -----
  122. on mouseUp
  123.   edit script of button "WHOOSH"
  124. end mouseUp
  125.  
  126.  
  127.  
  128. -- part 5 (button)
  129. -- low flags: 00
  130. -- high flags: 2000
  131. -- rect: left=444 top=128 right=166 bottom=485
  132. -- title width / last selected line: 0
  133. -- icon id / first selected line: 20098 / 20098
  134. -- text alignment: 1
  135. -- font id: 0
  136. -- text size: 12
  137. -- style flags: 0
  138. -- line height: 16
  139. -- part name: Home
  140. ----- HyperTalk script -----
  141. on mouseUp
  142.   visual effect iris close
  143.   go home
  144. end mouseUp
  145.  
  146.  
  147.  
  148. -- part 10 (button)
  149. -- low flags: 00
  150. -- high flags: E002
  151. -- rect: left=23 top=192 right=242 bottom=130
  152. -- title width / last selected line: 0
  153. -- icon id / first selected line: 0 / 0
  154. -- text alignment: 1
  155. -- font id: 0
  156. -- text size: 12
  157. -- style flags: 0
  158. -- line height: 16
  159. -- part name: DONE!
  160.  
  161.  
  162. -- part 9 (button)
  163. -- low flags: 00
  164. -- high flags: 0001
  165. -- rect: left=22 top=191 right=243 bottom=132
  166. -- title width / last selected line: 0
  167. -- icon id / first selected line: 0 / 0
  168. -- text alignment: 1
  169. -- font id: 0
  170. -- text size: 12
  171. -- style flags: 0
  172. -- line height: 16
  173. -- part name: cover
  174.  
  175.  
  176. -- part contents for card part 2
  177. ----- text -----
  178. AUTOMATES OPERATION OF PLACING A BUTTON ON THE HOME CARD  POINTING TO THE CURRENT STACK.
  179. ----------------------------------------
  180. To use it: The easiest way to use WhooshButton is to copy this entire card into your own stack. Then you can customize the screen, button names and sizes etc., to fit your stack. You will need to change card and stack names in the "go to card" line of the "WHOOSH" button script. You'll also need to rename the stack to load in the WhooshButton button script (the WhooshButton itself is hidden behind this field).      
  181.  
  182. If you wish to to totally customize your button whooshing, you may alternatively copy only the button "WHOOSH" into your stack, and design the rest yourself. Note that on this card a blank opaque button hides the "done" alert button until the whoosh operation is completed. Needless to say, there are many different ways to accomplish this--the method used here is only one. 
  183.  
  184. Here at the Acme Dot Company, sharing stackware tools gives us a lot of pleasure. Hope to see home buttons whooshing in your stacks soon.
  185.  
  186. -- John